package com.magupe.netty.im.server.handler;

import com.magupe.netty.im.common.protocol.entity.Message;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class HelloServerHandler extends SimpleChannelInboundHandler<Message> {

	@Override
	protected void channelRead0(ChannelHandlerContext ctx, Message msg) throws Exception {
		System.err.println(msg);
		msg.setResult("I have received your message.");
		
		ctx.writeAndFlush(msg);
	}

}
